package com.zdemo.address;


public class Tester {

	
	public static void main(String[] args) {
		Thread t1 = new Thread() {
			@Override
			public void run() {
				Integer i = new Integer(100);
				Integer[] arr = { new Integer(1), new Integer(2), new Integer(3),
						new Integer(4), new Integer(5)};
				PairValue pairValue = PairValue.init(i, arr);
				for(int cnt = 1;;cnt++) {
					if(cnt % 4 == 0) {
						arr[0] = cnt;
						i = cnt * 100;
						System.out.println("changed:");
					}
					System.out.println(pairValue);
					Tester.sleep();
				}
			}
		};
		
		t1.start();
	}
	
	private static void sleep() {
		try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
